javascript type conversion

the typeof operator returns the type of a variale or expression.

converting the numbers to string

the number method toString() method also does the same.

now we will convert Dates to Number

Autometic type conversion

when javascript tries to operate on a wrong data type, it will try to convert to a right data type by default. but the result is not always, what you expect.